<h1 mat-dialog-title>New Job Definition</h1>
<form [formGroup]="jobDefinitionForm" (submit)="onSubmit()">
    <div mat-dialog-content>
        <mat-progress-bar mode='indeterminate' *ngIf='loading'></mat-progress-bar>
        <app-job-definition-form (formReady)="onFormReady($event)"></app-job-definition-form>
        <div>
          <mat-checkbox formControlName="isDefault" (change)="onDefaultChange($event)">Set as default?</mat-checkbox>
        </div>
        <div *ngIf="!isDefaultChecked">
          <mat-checkbox formControlName="isDeletion">Is resource deletion job?</mat-checkbox>
        </div>
      </div>
      <div mat-dialog-actions>
          <button mat-button cdkFocusInitial>Save</button>
          <button mat-button [mat-dialog-close]="false">Cancel</button>
      </div>
</form>

